1
general::
In a precarious or risky position, as in After failing the midterm, he was on thin ice with his math teacher. This metaphor is often rounded out as skate on thin ice, as in He knew he was skating on thin ice when he took his rent money with him to the racetrack. This idiom, which alludes to the danger that treading on thin ice will cause it to break, was first used figuratively by Ralph Waldo Emerson in his essay Prudence (1841): "In skating over thin ice our safety is in our speed."
American Heritage Idioms
2
general::
Phrase(s): on thin ice
1. Lit. on ice that is too thin to support one. (See also skate on thin ice; walk on thin ice.) • Billy is on thin ice and is in great danger. 2. Fig. in a risky situation. • If you try that you’ll really be on thin ice. That’s too risky. • If you don’t want to find yourself on thin ice, you must be sure of your facts.
McGrawhill's American Idioms And Phrasal Verbs